package down 
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import morn.core.handlers.Handler;
	import ui.down.HuansuanUI;
	/**
	 * ...
	 * @author oppo
	 */
	public class HuanSuan extends HuansuanUI{
		private static var _instance:HuanSuan
		public static function get instance():HuanSuan{
			if(_instance) return _instance;
			return _instance=new HuanSuan();
		}
		private var bitmap:Bitmap;
		public function start():void{
			App.loader.loadBMD("flash/imgSpeed.png",new Handler(this.onLoadOver));
			this.addEventListener(MouseEvent.CLICK,this.onStageClick);
			
		}
		private function onLoadOver(bmd:BitmapData):void{
			if(!this.bitmap){
				this.bitmap=new Bitmap();
				this.bitmap.x=27;
				this.bitmap.y=99;
			}
			this.bitmap.bitmapData=bmd;
			this.popup();
			this.addChild(this.bitmap);
		}
		private function onStageClick(evt:Event):void{
			if(evt.target.name!="btClose") return;
			this.close();
		}
	}

}